<template>
  <swiper class="swiper" :indicator-dots="indicatorDots"
          :autoplay="autoplay"
          :interval="interval"
          :duration="duration"
          :circular="circular"
          indicator-active-color="#ffffff"
          indicator-color="rgb(0, 0, 0, .1)">
    <block v-for="item in images" :key="item">
      <swiper-item>
        <image style="width: 100%; height: 100%;" class="slide-image" mode="aspectFit"/>
      </swiper-item>
    </block>
  </swiper>
</template>

<script>
  import Core from 'core'
  import Common from 'common'

  export default {
    props: {
      images: {
        type: Array
      }
    },
    data () {
      return {
        indicatorDots: true,
        autoplay: true,
        interval: 3000,
        duration: 500,
        circular: true
      }
    },
    methods: {
      goToGoodsDetailPage (id) {
        Common.go('/pages/产品中心/详情/main?goods_id=' + id)
      }
    }
  }
</script>

<style lang="scss" scoped>
  .swiper {
    height: 126px !important;
    image {
      width: 100%;
      height: 100%;
      background: #333;
    }
  }
</style>
